﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChartSharp
{
    public class SimpleEncoder : BaseEncoder<int>
    {
        private static readonly string _encodingValues = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

        protected internal override string Prefix
        {
            get { return "s"; }
        }

        protected internal override string DataSetsSeparator
        {
            get { return ","; }
        }

        protected internal override string NumbersSeparator
        {
            get { return string.Empty; }
        }

        protected override string MissingValue
        {
            get { return "_"; }
        }

        protected override int MinValidValue
        {
            get { return 0; }
        }

        public override int MaxValidValue
        {
            get { return 61; }
        }

        protected override string EncodeValue(int value)
        {
            return _encodingValues[value].ToString();
        }
    }
}
